<%@page import="java.util.ResourceBundle"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.text.Format"%>
<%@page import="net.tanesha.recaptcha.ReCaptchaFactory"%>
<%@page import="net.tanesha.recaptcha.ReCaptcha"%>
<%
	String title = (String) request.getAttribute("title");
	String description = (String) request.getAttribute("description");
	String keywords = (String) request.getAttribute("keyword");
	String[] check = (String[]) request.getAttribute("check");
	String email = (String) request.getAttribute("email");
	String website = (String) request.getAttribute("website");
	ResourceBundle resource = ResourceBundle.getBundle("config");
%>
<jsp:include page="layout/header.jsp">
	<jsp:param name="title" value="<%=title %>" />
	<jsp:param name="description" value="<%=description %>" />
	<jsp:param name="keywords" value="<%=keywords %>" />
</jsp:include>
<div id="mainpage">
	<div id="maincontent">
		<h1>Update account</h1>
		<div class="box-wrapper">
			<div class="accountinfo">
				<div class="leftside">					
					<form class="update_acc" action="/update" method="post">
						<div>
							<input type="radio" id="price-1" name="price" value="1" checked="checked" />
							<label for="price-1">06 month ( Price : $<%=resource.getString("6_month") %> )</label>
						</div>
						<div>
							<input type="radio" id="price-2" name="price" value="2" />
							<label for="price-2">12 month ( Price : $<%=resource.getString("12_month") %> )</label>
						</div>
						<div>
							<input type="radio" id="price-3" name="price" value="3" />
							<label for="price-3">18 month ( Price : $<%=resource.getString("18_month") %> )</label>
						</div>
						<div>
							<input type="radio" id="price-4" name="price" value="4" />
							<label for="price-4">24 month ( Price : $<%=resource.getString("24_month") %> )</label>
						</div>
						<button class="button-style">Update now</button>
					</form>
					<div class="account-update-intro">
						<h2>Account subscriptions</h2>
						<p>On this page	you can upgrade or downgrade your Firstping account to another package type</p>
						<ul>
							<li>Monitor 2 sites</li>
							<li>10 minute checks</li>
							<li>Unlimited email alert</li>
						</ul>
					</div>
					<div class="clearbreak"></div>
				</div>
				<div class="rightside">
					<h2>My Account</h2>
					<ul>
						<li class="subinfo"><strong>Exp date</strong> : <%
							Format formatter = new SimpleDateFormat("MM/dd/yy");
							String s = formatter.format(session.getAttribute("exp"));
							out.print(s);
						%> <br /> <strong>Type</strong> : <%=session.getAttribute("type")%>
							<br /> <strong>Request</strong> : <%=session.getAttribute("req")%>
							Minutes <a class="button-style" href="/update">Update Account</a>
						</li>
						<li><a href="/account">Account</a>
						</li>
						<li><a href="/add-site">Add site</a>
						</li>
						<li><a href="/change-password">Change password</a>
						</li>
						<li><a href="/logout">Logout</a>
						</li>
					</ul>
				</div>
				<div class="clearbreak"></div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript" src="/js/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	var url = location.href;
	var arr = url.split("#");
	var price = 1;
	if(arr.length == 2)
	{
		price = arr[1]; 
	}
	$(".update_acc input").each(function(index){
		if($(this).val()==price)
		{
			$(this).attr("checked",true);
		}
	});
});
</script>
<jsp:include page="/layout/footer.jsp">
	<jsp:param name="language" value="1" />
</jsp:include>
